package com.fenghongzhang.sample.recycleview2

import android.view.View
import android.widget.TextView
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.recycleview2_left_layout.view.*
import kotlinx.android.synthetic.main.recycleview2_right_layout.view.*

/**
 * 密封类. 解决when判卷条件中 else的选项
 */
sealed class MsgViewHolder(view:View) : RecyclerView.ViewHolder(view)
class LeftViewHolder(view: View) : MsgViewHolder(view){
    val leftText: TextView = view.recycleView_left
}

class RightViewHolder(itemView: View) : MsgViewHolder(itemView){
    val rightText : TextView = itemView.recycleView_right
}